TWAIN is a protocol and applications programming interface (API) that controls communication between application software and imaging devices such as scanners and digital cameras. The word TWAIN is from the phrase “ . . . and never the twain shall meet . . . ” in Rudyard Kipling's “The Ballad of East and West” and reflects the difficulty of connecting scanners and computing devices which is intended to be alleviated by the TWAIN protocol.
Once application software has obtained an image from an imaging device using the TWAIN protocol, the application software can call optical character recognition (OCR) software to translate text within the image into machine editable text. The OCR returns the machine editable text to the application software directly or by storing the machine editable text into a text file accessible by the application software.